500 |
Is it possible to prevent closing the control's filter bar, so it is always shown
with ComboBox1 do begin BeginUpdate(); (IUnknown(Columns.Add('Item')) as EXCOMBOBOXLib_TLB.Column).DisplayFilterButton := True; with (IUnknown(Columns.Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarCaption := 'len(value) = 0 ? `<fgcolor=808080>no filter` : value'; FilterBarPromptVisible := EXCOMBOBOXLib_TLB.exFilterBarVisible; with Columns.Item[OleVariant(0)] do begin FilterType := EXCOMBOBOXLib_TLB.exFilter; Filter := 'Item B'; end; ApplyFilter(); EndUpdate(); end |
499 |
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 3)
with ComboBox1 do begin BeginUpdate(); with VisualAppearance do begin Add(3,'gBFLBCJwBAEHhEJAAEhABDwCg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQSB' + 'cQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+OpfD' + 'xXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4l' + 'lWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJegef4zluaJ3nqPJeCYH4BAeX5TDLBpVGqKRRnwf4flefZtHsX54BYAR/F+EwVnUd5eAMMJKDIChygyIQpAoEh4iIJ5JlgX' + 'IcgCXpIGoFwnGEQh6BEKBgmMIICHgIJCAiUAzgyUoAhwJohkiRgygwYpiGoKwzGIcgKCkNQNCMRIbCYCRYk4QoMiOchWDwNBjhiJJaDYTRiGiFwlCQAhOE8JBJHITIRg' + 'wZRZFCFCZBkOIUhKTRpCWAwgGYQ4El4NxlBifIWCcCYCFoaoMGaKYyG6GxlBmGJdhkCAWBIeA5g4U4QhMJAImkPIShRVxGgQJRlCIUISh+SJpnCZIeBgFgiHgO4OlOMI' + 'NCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYgYiaHopiuaRakCbIsisSpGjYOwaHYKYMCkK5CA2IxrCwCwFigaJrkLTI6lcdANAEgIA='); Add(1,'CP:3 -2 -2 2 2'); Add(4,'gBFLBCJwBAEHhEJAAEhABEICg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQSB' + 'cQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+OpfD' + 'xXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4l' + 'lWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJeg8X4rluaZ3niGB+AQHx/EyShjjEVYqiUR5rnmex/GAB5+AIf4gEeXJFHyXZ3gCTAygyAociMKBKEKBIeCiCZyHYFAnCEe' + 'Bkh+BghFgRIegOCgYCySAgh4CAkgINAMmMNIgCcCYjn4LoLmMCJGDKC5ijIagoDMYhCAoJg1A0IxEhsJgJFiThChCY5yFYPA0GOGIYloNhNGIaIXCUJACE4TwkEkchOF' + 'SFYlFkXhUCUCQZEYTglCSMxaEkYJIBmFJhDeDZZEYPwlgmQhghaGqVDoa4bGaeY6FGGZNlmFIBGEJ4jhiZQ5AkMhAg6E5JCkRoGCUSQ6B6CYiSCBIOh+DhJmmARiWQOJ' + 'tDsCJSCSBwkXSLIRicaZ6HqIIomoIguhwIpphIHoWDsJ4mCGChpmqOpGheLIOkqUo2iya4DjGJxihiQoSj4IJaDaMpCjCWoGg6PgpBiQ4tHcQJQBAgI='); Add(2,'CP:4 -2 -2 2 2'); end; LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesAtRoot; HasButtons := EXCOMBOBOXLib_TLB.exCustom; HasButtonsCustom[False] := 16777216; HasButtonsCustom[True] := 33554432; Columns.Add('Column'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Null,'Child'); end; EndUpdate(); end |
498 |
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 2)
with ComboBox1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'XP:TREEVIEW 2 1'); Add(2,'XP:TREEVIEW 2 2'); end; Background[EXCOMBOBOXLib_TLB.exTreeGlyphOpen] := $1000000; Background[EXCOMBOBOXLib_TLB.exTreeGlyphClose] := $2000000; LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Columns.Add('Column'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Null,'Child'); end; EndUpdate(); end |
497 |
How can I find if the control is running in DPI mode
|
496 |
How can I change the visual appearance of the +/- buttons (method 1)
with ComboBox1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAAEhABDwCg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQSB' + 'cQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+OpfD' + 'xXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4l' + 'lWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJegef4zluaJ3nqPJeCYH4BAeX5TDLBpVGqKRRnwf4flefZtHsX54BYAR/F+EwVnUd5eAMMJKDIChygyIQpAoEh4iIJ5JlgX' + 'IcgCXpIGoFwnGEQh6BEKBgmMIICHgIJCAiUAzgyUoAhwJohkiRgygwYpiGoKwzGIcgKCkNQNCMRIbCYCRYk4QoMiOchWDwNBjhiJJaDYTRiGiFwlCQAhOE8JBJHITIRg' + 'wZRZFCFCZBkOIUhKTRpCWAwgGYQ4El4NxlBifIWCcCYCFoaoMGaKYyG6GxlBmGJdhkCAWBIeA5g4U4QhMJAImkPIShRVxGgQJRlCIUISh+SJpnCZIeBgFgiHgO4OlOMI' + 'NCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYgYiaHopiuaRakCbIsisSpGjYOwaHYKYMCkK5CA2IxrCwCwFigaJrkLTI6lcdANAEgIA='); Add(2,'gBFLBCJwBAEHhEJAAEhABEICg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQSB' + 'cQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+OpfD' + 'xXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4l' + 'lWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJeg8X4rluaZ3niGB+AQHx/EyShjjEVYqiUR5rnmex/GAB5+AIf4gEeXJFHyXZ3gCTAygyAociMKBKEKBIeCiCZyHYFAnCEe' + 'Bkh+BghFgRIegOCgYCySAgh4CAkgINAMmMNIgCcCYjn4LoLmMCJGDKC5ijIagoDMYhCAoJg1A0IxEhsJgJFiThChCY5yFYPA0GOGIYloNhNGIaIXCUJACE4TwkEkchOF' + 'SFYlFkXhUCUCQZEYTglCSMxaEkYJIBmFJhDeDZZEYPwlgmQhghaGqVDoa4bGaeY6FGGZNlmFIBGEJ4jhiZQ5AkMhAg6E5JCkRoGCUSQ6B6CYiSCBIOh+DhJmmARiWQOJ' + 'tDsCJSCSBwkXSLIRicaZ6HqIIomoIguhwIpphIHoWDsJ4mCGChpmqOpGheLIOkqUo2iya4DjGJxihiQoSj4IJaDaMpCjCWoGg6PgpBiQ4tHcQJQBAgI='); end; LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Background[EXCOMBOBOXLib_TLB.exTreeGlyphOpen] := $1000000; Background[EXCOMBOBOXLib_TLB.exTreeGlyphClose] := $2000000; Columns.Add('Column'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Null,'Child'); end; EndUpdate(); end |
495 |
Is there a way to change the dropdown button arrow to something else ( ebn, sample 3 )
with ComboBox1 do begin BeginUpdate(); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADKMA4SOKIZhrE4bBhGaQRUgyI43RhHUBzVI' + 'UcQvE6TZRHCQYHgkNIhDJIM7TPLkeSVJaTIRoKhJUogApQThTMgVRDEThkGoSa6soSoYTDBKybLrSLKagOT5YUDKUqSdKEZRpEq1YztWbaQoCUoqVRRVIWfbNd4JJa4a' + 'DhWpYdpeeY5R7bWLgBYVVABL7LLRsSxpHxPF6RXxaeI3GKsaS8G6ic6nPQMHj7I4NS5pUa6Rh2VYNSa8AAtETRYznOw4bTMXAjNIea5bAYIIR5HIoDzVbQcCQAHL9DBe' + 'EMIQEEISgGhMGZQmocgymoYRRCIEQ0G2HYBnEIBig4V4zCQGINnmagCECY43medZ6H2Pw/g+X5fnueh/h+R5+AKABfkMWgGgGYA4AICoCGCE5WA4CphACMgSD2IRIDIB' + 'ICmEd5YGCBpRjGBgegWIYIgWdgoGIRQsiKCZiAiJZ0gGQI4jUS4LECOAiBmDJflGfg2BSY4Al4OhGkOCJ2DgFJjGGfgqgiH5Ch4RhGkqOQmEOEpkFkHQYhJRYyESAokG' + 'KHhIhKIxJEmf4VGUeRGFmF5iBkchPhYJQ5GoYIZg6Ug6GoFYmkmNhuhuZwJkYcoagiZ5+HQFRngmZh6h6Z5JnYfodCaCgGBcOpfBQBCAgA=='); Background[EXCOMBOBOXLib_TLB.exDropDownButtonUp] := $1000000; Background[EXCOMBOBOXLib_TLB.exDropDownButtonDown] := $1f0f0f0; LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Style := EXCOMBOBOXLib_TLB.DropDownList; IntegralHeight := True; Columns.Add('P1'); with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; SelectItem[h] := True; end; EndUpdate(); end |
494 |
Is there a way to change the dropdown button arrow to something else ( ebn, sample 2 )
with ComboBox1 do begin BeginUpdate(); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABKgCg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADKMA4SOKIZhrE4bBhGaQRUgyI43RhHUBzVI' + 'UcQvE6TZRHCQYHgkNIhDJIM7TPLkeSVJaTIRoKhJUogApQThTMgVRDEThkGoSa6soSoYTDBKybLrSLKagOT5YUDKUqSdKEZRpEq1YztWbaQoCUoqVRRVIWfbNd4JJa4a' + 'DhWpYdpeeY5R7bWLgBYVVABL7LLRsSxpHxPF6RXxaeI3GKsaS8G6ic6nPQMHj7I4NS5pUa6Rh2VYNSa8AAtETRYznOw4bTMXAjNIea5bAYIIR5HIoDzVbQcCQAHL9DBe' + 'EMIQEEISgGhMGZQmocgymoYRRCIEQ0G2HYBnEIBig4V4zCQGINnmagCECY43medZ6H2Pw/EeH5wiITwUkWMRsF4PYgEeaZ3gGYBoCWeICk6V5wnMf4FDCAAfAiYQgg4A' + 'YAmAWC7gIIYnm2fR/mEUYAF4GIFFEVBYgUYR4BCdoGmKSB6A+CAhDGBBfBiT4IlSdQ9A8WIWCeBJihgZgcg+YJoEIFYMiMSJWAaDZjhiGgogCIooG4QYMAIOQSDUPgil' + 'ONhIg6JI4GIK4LiQKJGDOFJgGMbJbDcDg5hYR4OCWCJyEyAQiCGChDheZBoDIYg3AMIJEVYQ4AnoZQ4mYeQmDsCJGmGNBwDQTQDEaAQcCYCZKGOHRDHgVgVh4J4phoDI' + 'SAaEYkGsNhNhMahVhyaJIFSDiuAIBIBCCaJ5mYe4VGGOhyHaBRInIPIRH2D5qkaIopCEOhCieBxjnqKoNgSapaj6OIsE+apOiWJBnkqYo6isKpqiGdIwCwKpWiaJIOls' + 'Ho8jIa4JFaTIomwOZuBeMgrmifpKgGbR6lAI4lEaM4ymYKIKCKEpfjqbI6kSHgnEmc5GnIOpfBQBCAg='); Background[EXCOMBOBOXLib_TLB.exDropDownButtonUp] := $1000000; Background[EXCOMBOBOXLib_TLB.exDropDownButtonDown] := $1808080; LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Style := EXCOMBOBOXLib_TLB.DropDownList; IntegralHeight := True; Columns.Add('P1'); with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; SelectItem[h] := True; end; EndUpdate(); end |
493 |
Is there a way to change the dropdown button arrow to something else ( ebn, sample 1 )
with ComboBox1 do begin BeginUpdate(); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABFACg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADKMA4SOKIZhrE4bBhGaQRUgyI43RhHUBzVI' + 'UcQvE6TZRHCQYHgkNIhDJIM7TPLkeSVJaTIRoKhJUogApQThTMgVRDEThkGoSa6soSoYTDBKybLrSLKagOT5YUDKUqSdKEZRpEq1YztWbaQoCUoqVRRVIWfbNd4JJa4a' + 'DhWpYdpeeY5R7bWLgBYVVABL7LLRsSxpHxPF6RXxaeI3GKsaS8G6ic6nPQMHj7I4NS5pUa6Rh2VYNSa8AAtETRYznOw4bTMXAjNIea5bAYIIR5HIoDzVbQcCQAHL9DBe' + 'EMIQEEISgGhMGZQmocgymoYRRCIEQ0G2HYBnEIBig4V4zCQGINnmagCECY43medZ6H2Pw/g+X5dlqIh/k8SAFnofxgDgFZ8gGH5ShYCgmiCQgeA6AghAgr5/EyWBUhCB' + 'ZPngZIvgaSpoHYEYBCEOAMnWCJGgiFgZgmYoIDiBw1iKSB+C4fQHhiRJjgyYoIlYJwXmOA56DqC5iAONIhg+S45AYNoQmGExqEYIJkgicZ2gsDRhG4ToSAgMZqFIOolE' + 'iHJzhWSIJGYUAZiWSBsi+EofEkGhiDaCIphSPIZmIcp2GoI4mkmDhGD4JwJgIPQkmcQwqHaCZKgmZI0h6ZwonCFIfmYKIch6IJMhoFh9ggXxIgydQZmjTR5iORhKEaB4' + 'PGAOgUkmD5KBiHItiaSwKHaE4CPuBoMVieJMmMH4qgofoIDsRx6jSZorksapGGUIoqiidJHi2RYKmSHIumEchAh2L5rFeWhUDqAxbBQSIxkeCwkjGMpOAsNpBH0Do3kU' + 'ASAg'); Background[EXCOMBOBOXLib_TLB.exDropDownButtonUp] := $1000000; Background[EXCOMBOBOXLib_TLB.exDropDownButtonDown] := $1808080; LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Style := EXCOMBOBOXLib_TLB.DropDownList; IntegralHeight := True; Columns.Add('P1'); with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; SelectItem[h] := True; end; EndUpdate(); end |
492 |
Is there a way to change the dropdown button arrow to something else ( theme, ebn )
with ComboBox1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'XP:SCROLLBAR 1 6'); Add(2,'XP:SCROLLBAR 1 7'); end; Background[EXCOMBOBOXLib_TLB.exDropDownButtonUp] := $1000000; Background[EXCOMBOBOXLib_TLB.exDropDownButtonDown] := $2000000; LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Style := EXCOMBOBOXLib_TLB.DropDownList; IntegralHeight := True; Columns.Add('P1'); with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; SelectItem[h] := True; end; EndUpdate(); end |
491 |
Is there a way to change the dropdown button arrow to something else ( no visual theme )
with ComboBox1 do begin BeginUpdate(); UseVisualTheme := Integer(EXCOMBOBOXLib_TLB.exBorderVisualTheme) Or Integer(EXCOMBOBOXLib_TLB.exCheckBoxVisualTheme) Or Integer(EXCOMBOBOXLib_TLB.exCalendarVisualTheme) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarVisualTheme) Or Integer(EXCOMBOBOXLib_TLB.exHeaderVisualTheme); LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Style := EXCOMBOBOXLib_TLB.DropDownList; IntegralHeight := True; Columns.Add('P1'); with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; SelectItem[h] := True; end; EndUpdate(); end |
490 |
Is there a way to change the dropdown button arrow to something else ( solid color )
with ComboBox1 do begin BeginUpdate(); Background[EXCOMBOBOXLib_TLB.exDropDownButtonDown] := $bebebe; Background[EXCOMBOBOXLib_TLB.exDropDownButtonUp] := $808080; LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Style := EXCOMBOBOXLib_TLB.DropDownList; IntegralHeight := True; Columns.Add('P1'); with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; SelectItem[h] := True; end; EndUpdate(); end |
489 |
How can I find if there is any filter applied to the control
// FilterChange event - Occurs when filter was changed. procedure TForm1.ComboBox1FilterChange(ASender: TObject; ); begin with ComboBox1 do begin OutputDebugString( 'If negative, the filter is present, else not' ); OutputDebugString( Items.VisibleItemCount ); end end; with ComboBox1 do begin BeginUpdate(); LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; TreeColumnIndex := -1; FilterInclude := EXCOMBOBOXLib_TLB.exMatchingItemsOnly; with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do begin DisplayFilterButton := True; FilterType := EXCOMBOBOXLib_TLB.exFilter; Filter := 'C1'; end; with Items do begin h := AddItem('R1'); InsertItem(h,Null,'C1'); InsertItem(h,Null,'C2'); ExpandItem[h] := True; h := AddItem('R2'); InsertItem(h,Null,'C1'); InsertItem(h,Null,'C2'); end; ApplyFilter(); EndUpdate(); end |
488 |
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option
with ComboBox1 do begin BeginUpdate(); LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; TreeColumnIndex := -1; FilterInclude := EXCOMBOBOXLib_TLB.exMatchingItemsOnly; with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do begin DisplayFilterButton := True; FilterType := EXCOMBOBOXLib_TLB.exFilter; Filter := 'C1|C2'; end; with Items do begin h := AddItem('R1'); InsertItem(h,Null,'C1'); InsertItem(h,Null,'C2'); ExpandItem[h] := True; h := AddItem('R2'); InsertItem(h,Null,'C1'); InsertItem(h,Null,'C2'); end; ApplyFilter(); EndUpdate(); end |
487 |
Is there any method to get only the matched items and not the items with his parent
with ComboBox1 do begin BeginUpdate(); LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; FilterInclude := EXCOMBOBOXLib_TLB.exMatchingItemsOnly; with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do begin DisplayFilterButton := True; FilterType := EXCOMBOBOXLib_TLB.exFilter; Filter := 'C1|C2'; end; with Items do begin h := AddItem('R1'); InsertItem(h,Null,'C1'); InsertItem(h,Null,'C2'); ExpandItem[h] := True; h := AddItem('R2'); InsertItem(h,Null,'C1'); InsertItem(h,Null,'C2'); end; ApplyFilter(); EndUpdate(); end |
486 |
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel
with ComboBox1 do begin BeginUpdate(); with (IUnknown(Columns.Add('Date')) as EXCOMBOBOXLib_TLB.Column) do begin SortType := EXCOMBOBOXLib_TLB.SortDate; DisplayFilterButton := True; DisplayFilterPattern := False; DisplayFilterDate := True; FilterList := Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsDesc); end; with (IUnknown(Columns.Add('DateTime')) as EXCOMBOBOXLib_TLB.Column) do begin SortType := EXCOMBOBOXLib_TLB.SortDateTime; DisplayFilterButton := True; DisplayFilterPattern := False; FilterList := Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsDesc); end; with (IUnknown(Columns.Add('Time')) as EXCOMBOBOXLib_TLB.Column) do begin SortType := EXCOMBOBOXLib_TLB.SortTime; DisplayFilterButton := True; DisplayFilterPattern := False; FilterList := Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsDesc); FormatColumn := 'time(value)'; end; with (IUnknown(Columns.Add('Numeric')) as EXCOMBOBOXLib_TLB.Column) do begin SortType := EXCOMBOBOXLib_TLB.SortNumeric; DisplayFilterButton := True; FilterList := Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsDesc); end; with (IUnknown(Columns.Add('String')) as EXCOMBOBOXLib_TLB.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsDesc); end; with Items do begin h := AddItem('1/27/2010'); CellCaption[OleVariant(h),OleVariant(1)] := '1/27/2010 10:00:00 AM'; CellCaption[OleVariant(h),OleVariant(2)] := CellCaption[OleVariant(h),OleVariant(1)]; CellCaption[OleVariant(h),OleVariant(3)] := OleVariant(1); CellCaption[OleVariant(h),OleVariant(4)] := CellCaption[OleVariant(h),OleVariant(3)]; h := AddItem('1/27/2011'); CellCaption[OleVariant(h),OleVariant(1)] := '1/27/2011 9:00:00 AM'; CellCaption[OleVariant(h),OleVariant(2)] := CellCaption[OleVariant(h),OleVariant(1)]; CellCaption[OleVariant(h),OleVariant(3)] := OleVariant(11); CellCaption[OleVariant(h),OleVariant(4)] := CellCaption[OleVariant(h),OleVariant(3)]; h := AddItem('11/2/2010'); CellCaption[OleVariant(h),OleVariant(1)] := '11/2/2010 9:00:00 AM'; CellCaption[OleVariant(h),OleVariant(2)] := CellCaption[OleVariant(h),OleVariant(1)]; CellCaption[OleVariant(h),OleVariant(3)] := OleVariant(2); CellCaption[OleVariant(h),OleVariant(4)] := CellCaption[OleVariant(h),OleVariant(3)]; end; Columns.Item['DateTime'].DisplayFilterDate := False; EndUpdate(); end |
485 |
How can I display a different column, on the control's label (method 2)
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDownList; SingleEdit := True; LabelColumnIndex := 1; DrawGridLines := EXCOMBOBOXLib_TLB.exVLines; (IUnknown(Columns.Add('Column 1')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); (IUnknown(Columns.Add('Column 2')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); with Items do begin CellCaption[OleVariant(AddItem('Item 1 on <b>Column 1')),OleVariant(1)] := 'Item 1 on <b>Column 2'; CellCaption[OleVariant(AddItem('Item 2 on <b>Column 1')),OleVariant(1)] := 'Item 2 on <b>Column 2'; CellCaption[OleVariant(AddItem('Item 3 on <b>Column 1')),OleVariant(1)] := 'Item 3 on <b>Column 2'; SelectItem[FirstVisibleItem] := True; end; EndUpdate(); end |
484 |
How can I display a different column, on the control's label (method 1)
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDownList; SingleEdit := True; SearchColumnIndex := 1; DrawGridLines := EXCOMBOBOXLib_TLB.exVLines; (IUnknown(Columns.Add('Column 1')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); (IUnknown(Columns.Add('Column 2')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); with Items do begin CellCaption[OleVariant(AddItem('Item 1 on <b>Column 1')),OleVariant(1)] := 'Item 1 on <b>Column 2'; CellCaption[OleVariant(AddItem('Item 2 on <b>Column 1')),OleVariant(1)] := 'Item 2 on <b>Column 2'; CellCaption[OleVariant(AddItem('Item 3 on <b>Column 1')),OleVariant(1)] := 'Item 3 on <b>Column 2'; SelectItem[FirstVisibleItem] := True; end; EndUpdate(); end |
483 |
How do I sort the index column as numeric
// InsertItem event - Occurs after a new item has been inserted to Items collection. procedure TForm1.ComboBox1InsertItem(ASender: TObject; Item : HITEM); begin with ComboBox1 do begin with Items do begin CellData[OleVariant(Item),OleVariant(1)] := OleVariant(ItemToIndex[Item]); end; end end; with ComboBox1 do begin BeginUpdate(); DrawGridLines := EXCOMBOBOXLib_TLB.exAllLines; ColumnAutoResize := True; ShowFocusRect := False; SingleEdit := True; with (IUnknown(Columns.Add('Next')) as EXCOMBOBOXLib_TLB.Column) do begin Def[EXCOMBOBOXLib_TLB.exCellPaddingLeft] := OleVariant(4); Def[EXCOMBOBOXLib_TLB.exHeaderPaddingLeft] := OleVariant(4); end; with (IUnknown(Columns.Add('Index')) as EXCOMBOBOXLib_TLB.Column) do begin AllowSizing := False; Width := 48; FormatColumn := '(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)'; Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); SortType := EXCOMBOBOXLib_TLB.SortUserData; Position := 0; end; with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); AddItem('Item 5'); AddItem('Item 6'); AddItem('Item 7'); AddItem('Item 8'); AddItem('Item 9'); AddItem('Item 10'); end; EndUpdate(); end |
482 |
How can I put icons/images into buttons
with ComboBox1 do begin BeginUpdate(); SingleEdit := True; Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); Columns.Add(''); with (IUnknown(Columns.Add('C+B')) as EXCOMBOBOXLib_TLB.Column) do begin AllowSizing := False; Width := 48; FormatColumn := '` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `'; Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True); Def[EXCOMBOBOXLib_TLB.exCellHasButton] := OleVariant(True); Def[EXCOMBOBOXLib_TLB.exCellButtonAutoWidth] := OleVariant(True); Position := 0; end; DrawGridLines := EXCOMBOBOXLib_TLB.exVLines; DefaultItemHeight := 20; with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); AddItem('Item 5'); AddItem('Item 6'); AddItem('Item 7'); AddItem('Item 8'); end; EndUpdate(); end |
481 |
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column
// CellButtonClick event - Fired after the user clicks on the cell of button type. procedure TForm1.ComboBox1CellButtonClick(ASender: TObject; Item : HCELL); begin with ComboBox1 do begin OutputDebugString( 'CellButtonClick' ); OutputDebugString( Item ); OutputDebugString( Key[Null] ); end end; // CellStateChanged event - Fired after cell's state has been changed. procedure TForm1.ComboBox1CellStateChanged(ASender: TObject; Item : HCELL); begin with ComboBox1 do begin OutputDebugString( 'CellStateChanged' ); OutputDebugString( Item ); OutputDebugString( Key[Null] ); end end; with ComboBox1 do begin BeginUpdate(); SingleEdit := True; with (IUnknown(Columns.Add('')) as EXCOMBOBOXLib_TLB.Column) do begin AllowSizing := False; Width := 32; FormatColumn := '1 index ``'; end; with (IUnknown(Columns.Add('Def')) as EXCOMBOBOXLib_TLB.Column) do begin AllowSizing := False; Width := 48; FormatColumn := '` `'; Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True); Def[EXCOMBOBOXLib_TLB.exCellHasButton] := OleVariant(True); Def[EXCOMBOBOXLib_TLB.exCellButtonAutoWidth] := OleVariant(True); end; Columns.Add(''); with Items do begin AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); end; EndUpdate(); end |
480 |
How can I show only the matching items, while user types in the drop down control
// EditChange event - Fired when the user has taken an action that may have altered text in an edit control. procedure TForm1.ComboBox1EditChange(ASender: TObject; ColIndex : Integer); begin with ComboBox1 do begin sLabel := EditText[OleVariant(ColIndex)]; OutputDebugString( 'Select the item that maches exactly the typing label: ' ); OutputDebugString( sLabel ); with Items do begin SelectItem[FocusItem] := False; SelectItem[FindItem[OleVariant(sLabel),OleVariant(ColIndex),Null]] := True; end; end end; with ComboBox1 do begin BeginUpdate(); SingleEdit := True; AutoComplete := False; AutoSelect := False; AutoSearch := False; AutoDropDown := True; IntegralHeight := True; HeaderVisible := False; Columns.Add('Friends'); with Items do begin AddItem('Fred'); AddItem('Tina'); AddItem('Tom'); end; EndUpdate(); end |
479 |
How do I unselect/deselect the item (Simple style)
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.Simple; Columns.Add('Def'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 3'); end; SearchColumnIndex := 0; Value := 'Item 2'; with Items do begin SelectItem[FocusItem] := False; end; EndUpdate(); end |
478 |
How do I unselect/deselect the item (DropDownList style)
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDown; Columns.Add('Def'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 3'); end; SearchColumnIndex := 0; Value := 'Item 2'; with Items do begin SelectItem[FocusItem] := False; end; EndUpdate(); end |
477 |
How do I unselect/deselect the item (DropDown style)
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDown; Columns.Add('Def'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 3'); end; SearchColumnIndex := 0; Value := 'Item 2'; with Items do begin SelectItem[FocusItem] := False; end; EndUpdate(); end |
476 |
Setting the ForeColor to red and then setting Enabled property on False the ForeColor returns back to original color of black/gray. What can be done (Style is Simple)
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.Simple; ColumnAutoResize := True; with Columns do begin Add('C1'); Add('C2'); end; with Items do begin CellCaption[OleVariant(AddItem('item a')),OleVariant(1)] := 'item b'; CellCaption[OleVariant(AddItem('item c')),OleVariant(1)] := 'item d'; end; Value := 'item a'; ForeColor := RGB(128,128,188); BackColor := RGB(240,240,240); HeaderForeColor := RGB(128,128,128); SelBackColor := RGB(128,128,128); BackColorEdit := RGB(0,0,0); ForeColorEdit := RGB(255,255,255); Enabled := False; EndUpdate(); end |
475 |
Setting the ForeColor to red and then setting Enabled property on False the ForeColor returns back to original color of black/gray. What can be done (Style is DropDownList)
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDownList; ColumnAutoResize := True; with Columns do begin Add('C1'); Add('C2'); end; with Items do begin CellCaption[OleVariant(AddItem('item a')),OleVariant(1)] := 'item b'; CellCaption[OleVariant(AddItem('item c')),OleVariant(1)] := 'item d'; end; Value := 'item a'; BackColorEdit := RGB(0,0,0); ForeColor := RGB(255,255,255); Enabled := False; EndUpdate(); end |
474 |
Setting the ForeColor to red and then setting Enabled property on False the ForeColor returns back to original color of black/gray. What can be done (Style is DropDown)
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDown; ColumnAutoResize := True; with Columns do begin Add('C1'); Add('C2'); end; with Items do begin CellCaption[OleVariant(AddItem('item a')),OleVariant(1)] := 'item b'; CellCaption[OleVariant(AddItem('item c')),OleVariant(1)] := 'item d'; end; Value := 'item a'; ForeColorEdit := RGB(255,255,255); BackColorEdit := RGB(0,0,0); Enabled := False; EndUpdate(); end |
473 |
How would you clear the displayed selection for style DropDownList. So if a user selects or searches a value in a style DropDownList, I want to know if I can reset the control back to an empty selection
// DropUp event - Occurs when the drop-down portion of the control is hidden. procedure TForm1.ComboBox1DropUp(ASender: TObject; ); begin with ComboBox1 do begin Value := ''; end end; // SelectionChanged event - Fired after a new item has been selected. procedure TForm1.ComboBox1SelectionChanged(ASender: TObject; ); begin with ComboBox1 do begin OutputDebugString( 'You selected: ' ); OutputDebugString( Value ); end end; with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDownList; HeaderVisible := False; AutoSearch := True; AutoDropDown := True; IntegralHeight := True; (IUnknown(Columns.Add('Default')) as EXCOMBOBOXLib_TLB.Column).AutoSearch := EXCOMBOBOXLib_TLB.exContains; with Items do begin AddItem('This is a bit of text'); AddItem('This is a another text'); DefaultItem := InsertItem(Null,Null,''); ItemPosition[0] := 0; SortableItem[0] := False; end; EndUpdate(); end |
472 |
I cannot seem to get autosearch=1 (contains) in the column object to search properly. It still only finds items that start with the typed character. I want to it look to see if the typed character(s) are contained in the item. I Can't seem to get this to work
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDownList; HeaderVisible := False; AutoSearch := True; AutoDropDown := True; IntegralHeight := True; (IUnknown(Columns.Add('Default')) as EXCOMBOBOXLib_TLB.Column).AutoSearch := EXCOMBOBOXLib_TLB.exContains; with Items do begin AddItem('This is a bit of text'); AddItem('This is a another text'); end; EndUpdate(); end |
471 |
If the user selects an item from the list, how can I clear that selection and return the control to the unselected state with the PROMPT text
// DropUp event - Occurs when the drop-down portion of the control is hidden. procedure TForm1.ComboBox1DropUp(ASender: TObject; ); begin with ComboBox1 do begin EditText[OleVariant(0)] := ''; end end; // SelectionChanged event - Fired after a new item has been selected. procedure TForm1.ComboBox1SelectionChanged(ASender: TObject; ); begin with ComboBox1 do begin OutputDebugString( 'You selected: ' ); OutputDebugString( Value ); end end; with ComboBox1 do begin BeginUpdate(); LabelHeight := 23; IntegralHeight := True; AutoComplete := False; AutoSearch := False; AutoDropDown := True; (IUnknown(Columns.Add('Default')) as EXCOMBOBOXLib_TLB.Column).Prompt := '<i><fgcolor=808080>type something</fgcolor></i>'; with Items do begin AddItem(OleVariant(0)); AddItem(OleVariant(1)); AddItem(OleVariant(2)); end; EndUpdate(); end |
470 |
How do I get notified once the user changes the Filter For field
// EditChange event - Fired when the user has taken an action that may have altered text in an edit control. procedure TForm1.ComboBox1EditChange(ASender: TObject; ColIndex : Integer); begin with ComboBox1 do begin OutputDebugString( 'ColIndex: ' ); OutputDebugString( ColIndex ); OutputDebugString( 'Label: ' ); OutputDebugString( EditText[OleVariant(0)] ); OutputDebugString( 'FilterFor: ' ); OutputDebugString( EditText[OleVariant(-1)] ); end end; with ComboBox1 do begin BeginUpdate(); FilterForVisible := True; FilterForBackColor := RGB(240,240,240); IntegralHeight := True; Columns.Add('Default'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); AddItem('Item 5'); end; EndUpdate(); end |
469 |
I am using the ScrollWidth/ScrollHeight property on 0 to hide the control's scroll bars, the question is that the drop down button is disappearing. What can be done so I can still show the drop down button
|
468 |
Does your control supports scrolling by touching the screen
with ComboBox1 do begin BeginUpdate(); ColumnAutoResize := False; rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExComboBox\Sample\Access\sample.mdb',3,3,Null); end; DataSource := (IUnknown(rs) as ADODB_TLB.Recordset); ScrollBySingleLine := True; AutoDrag := Integer(EXCOMBOBOXLib_TLB.exAutoDragScrollOnShortTouch) Or Integer(EXCOMBOBOXLib_TLB.exAutoDragScroll); EndUpdate(); end |
467 |
How can I make bigger/enlarge the control's drop down button
with ComboBox1 do begin BeginUpdate(); LabelHeight := 40; ScrollWidth := 40; EndUpdate(); end |
466 |
How do I select a NULL/empty value
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDownList; Columns.Add('Items'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); DefaultItem := InsertItem(Null,Null,''); ItemPosition[0] := 0; SortableItem[0] := False; end; Value := ''; EndUpdate(); end |
465 |
How can I add a vertical padding
with ComboBox1 do begin BeginUpdate(); DrawGridLines := EXCOMBOBOXLib_TLB.exAllLines; with (IUnknown(Columns.Add('Padding')) as EXCOMBOBOXLib_TLB.Column) do begin Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True); Def[EXCOMBOBOXLib_TLB.exCellSingleLine] := OleVariant(False); Def[EXCOMBOBOXLib_TLB.exCellPaddingLeft] := OleVariant(6); Def[EXCOMBOBOXLib_TLB.exCellPaddingRight] := OleVariant(6); Def[EXCOMBOBOXLib_TLB.exCellPaddingTop] := OleVariant(6); Def[EXCOMBOBOXLib_TLB.exCellPaddingBottom] := OleVariant(6); end; with Items do begin AddItem('padding'); AddItem('padding'); end; EndUpdate(); end |
464 |
How can I add or change the padding (spaces) for captions in the control's header
with ComboBox1 do begin BeginUpdate(); (IUnknown(Columns.Add('Padding-Left')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exHeaderPaddingLeft] := OleVariant(18); with (IUnknown(Columns.Add('Padding-Right')) as EXCOMBOBOXLib_TLB.Column) do begin Def[EXCOMBOBOXLib_TLB.exHeaderPaddingRight] := OleVariant(18); HeaderAlignment := EXCOMBOBOXLib_TLB.RightAlignment; end; EndUpdate(); end |
463 |
Is it possible to change the height for all items at once
with ComboBox1 do begin BeginUpdate(); LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Columns.Add('Items'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); h := AddItem('Root 2'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[0] := True; end; EndUpdate(); DefaultItemHeight := 12; Items.ItemHeight[0] := 12; end |
462 |
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)
with ComboBox1 do begin BeginUpdate(); MarkSearchColumn := False; with Columns do begin with (IUnknown(Add('Car')) as EXCOMBOBOXLib_TLB.Column) do begin DisplayFilterButton := True; FilterType := EXCOMBOBOXLib_TLB.exFilter; Filter := 'MAZDA'; end; with (IUnknown(Add('Equipment')) as EXCOMBOBOXLib_TLB.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*'; FilterType := EXCOMBOBOXLib_TLB.exPattern; Filter := 'AIR BAG'; end; end; with Items do begin CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag'; CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition'; CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition'; CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP'; CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP'; CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP'; end; ApplyFilter(); EndUpdate(); end |
461 |
How can I have a case-sensitive filter
with ComboBox1 do begin BeginUpdate(); MarkSearchColumn := False; with Columns do begin with (IUnknown(Add('Car')) as EXCOMBOBOXLib_TLB.Column) do begin DisplayFilterButton := True; FilterType := Integer(EXCOMBOBOXLib_TLB.exFilterDoCaseSensitive) Or Integer(EXCOMBOBOXLib_TLB.exFilter); Filter := 'Mazda'; end; with (IUnknown(Add('Equipment')) as EXCOMBOBOXLib_TLB.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*'; FilterType := Integer(EXCOMBOBOXLib_TLB.exFilterDoCaseSensitive) Or Integer(EXCOMBOBOXLib_TLB.exPattern); Filter := 'Air Bag'; end; end; with Items do begin CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag'; CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition'; CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition'; CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP'; CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP'; CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP'; end; ApplyFilter(); EndUpdate(); end |
460 |
Is it possible to filter the items as I type
// EditChange event - Fired when the user has taken an action that may have altered text in an edit control. procedure TForm1.ComboBox1EditChange(ASender: TObject; ColIndex : Integer); begin with ComboBox1 do begin Columns.Item[OleVariant(0)].Filter := ComboBox1.EditText[OleVariant(0)]; ApplyFilter(); end end; with ComboBox1 do begin BeginUpdate(); MarkSearchColumn := False; SingleEdit := True; AutoComplete := False; AutoDropDown := True; IntegralHeight := True; with Columns do begin with (IUnknown(Add('Items')) as EXCOMBOBOXLib_TLB.Column) do begin Prompt := '<i><fgcolor=808080>Start Filter</fgcolor></i>'; FilterType := EXCOMBOBOXLib_TLB.exPattern; end; end; with Items do begin AddItem('A'); AddItem('B'); AddItem('C'); AddItem('AB'); AddItem('AC'); AddItem('BA'); AddItem('BC'); AddItem('CC'); end; EndUpdate(); end |
459 |
What is the equivalent to combo1.text=combo1.list(index) to select a row in the combo
|
458 |
What is the equivalent to combo1.text=combo1.list(index) to select a row in the combo
|
457 |
What is the equivalent to combo1.text=combo1.list(index) to select a row in the combo
|
456 |
What is the equivalent to combo1.text=combo1.list(index) to select a row in the combo
|
455 |
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column
with ComboBox1 do begin BeginUpdate(); MarkSearchColumn := False; with ConditionalFormats.Add('1',Null) do begin Bold := True; ForeColor := $ff; ApplyTo := EXCOMBOBOXLib_TLB.FormatApplyToEnum($1); end; Columns.Add('C1'); with (IUnknown(Columns.Add('C2')) as EXCOMBOBOXLib_TLB.Column) do begin HeaderBold := True; HTMLCaption := '<fgcolor=FF0000>C2'; end; with Items do begin CellCaption[OleVariant(AddItem(OleVariant(10))),OleVariant(1)] := OleVariant(11); CellCaption[OleVariant(AddItem(OleVariant(12))),OleVariant(1)] := OleVariant(13); end; EndUpdate(); end |
454 |
How can I add a horizontal scroll bar
with ComboBox1 do begin BeginUpdate(); ScrollBySingleLine := True; ColumnAutoResize := False; BackColorAlternate := RGB(240,240,240); with (IUnknown(Columns.Add('Default')) as EXCOMBOBOXLib_TLB.Column) do begin Width := 512; Def[EXCOMBOBOXLib_TLB.exCellSingleLine] := OleVariant(False); end; with Items do begin AddItem('Exontrol is devoted to create innovative user interface components for Windows applications, on COM or .NET platforms, since 199' + '9. "eXontrol" comes from e(s)pecial (c)ontrol, where sc makes the X. We are a vendor not a reseller, and this is the single site' + ' where you can try or buy our products. If you are tired of looking for "powerful" components now it''s time to show you real com' + 'ponents. No registration required, no nag screens, no limitations, unlimited evaluation time.'); AddItem('A combo box is a commonly-used GUI tool. It is a combination of a drop-down list or list box and a single-line textbox, allowing' + ' the user either to type a value directly into the control or choose from the list of existing options.'); end; EndUpdate(); end |
453 |
Does the control have the option to have a horizontal scroll to show entries which are longer than the display
with ComboBox1 do begin BeginUpdate(); ColumnAutoResize := False; (IUnknown(Columns.Add('Default')) as EXCOMBOBOXLib_TLB.Column).Width := 512; with Items do begin AddItem('Exontrol is devoted to create innovative user interface components for Windows applications, on COM or .NET platforms, since 199' + '9. "eXontrol" comes from e(s)pecial (c)ontrol, where sc makes the X. We are a vendor not a reseller, and this is the single site' + ' where you can try or buy our products. If you are tired of looking for "powerful" components now it''s time to show you real com' + 'ponents. No registration required, no nag screens, no limitations, unlimited evaluation time.'); AddItem('A combo box is a commonly-used GUI tool. It is a combination of a drop-down list or list box and a single-line textbox, allowing' + ' the user either to type a value directly into the control or choose from the list of existing options.'); end; EndUpdate(); end |
452 |
Is it possible to auto-numbering the children items but still keeps the position after filtering
with ComboBox1 do begin BeginUpdate(); LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; with (IUnknown(Columns.Add('Items')) as EXCOMBOBOXLib_TLB.Column) do begin DisplayFilterButton := True; FilterType := EXCOMBOBOXLib_TLB.exFilter; Filter := 'Child 2'; end; with (IUnknown(Columns.Add('Pos.1')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '1 ropos '''''; Position := 0; Width := 32; AllowSizing := False; end; with (IUnknown(Columns.Add('Pos.2')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '1 ropos '':'''; Position := 1; Width := 32; AllowSizing := False; end; with (IUnknown(Columns.Add('Pos.3')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '1 ropos '':|A-Z'''; Position := 2; Width := 32; AllowSizing := False; end; with (IUnknown(Columns.Add('Pos.4')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '1 ropos ''|A-Z|'''; Position := 3; Width := 32; AllowSizing := False; end; with (IUnknown(Columns.Add('Pos.5')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '''<font Tahoma;7>'' + 1 ropos ''-<b>||A-Z'''; Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); Position := 4; Width := 32; AllowSizing := False; end; with (IUnknown(Columns.Add('Pos.6')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '''<b>''+ 1 ropos ''</b>:<fgcolor=FF0000>|A-Z|'''; Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); Position := 5; Width := 48; AllowSizing := False; end; with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); end; ApplyFilter(); EndUpdate(); end |
451 |
How do I prevent scrolling the control's data after user does the sort
with ComboBox1 do begin EnsureOnSort := False; Columns.Add('Column'); with Items do begin AddItem('Item 3'); AddItem('Item 1'); AddItem('Item 2'); end; PutItems(GetItems(OleVariant(0)),Null); PutItems(GetItems(OleVariant(0)),Null); PutItems(GetItems(OleVariant(0)),Null); Columns.Item[OleVariant(0)].SortOrder := EXCOMBOBOXLib_TLB.SortAscending; end |
450 |
Is it possible to auto-numbering the children items too
with ComboBox1 do begin BeginUpdate(); LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Columns.Add('Items'); with (IUnknown(Columns.Add('Pos.1')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '1 rpos '''''; Position := 0; Width := 32; AllowSizing := False; end; with (IUnknown(Columns.Add('Pos.2')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '1 rpos '':'''; Position := 1; Width := 32; AllowSizing := False; end; with (IUnknown(Columns.Add('Pos.3')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '1 rpos '':|A-Z'''; Position := 2; Width := 32; AllowSizing := False; end; with (IUnknown(Columns.Add('Pos.4')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '1 rpos ''|A-Z|'''; Position := 3; Width := 32; AllowSizing := False; end; with (IUnknown(Columns.Add('Pos.5')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '''<font Tahoma;7>'' + 1 rpos ''-<b>||A-Z'''; Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); Position := 4; Width := 32; AllowSizing := False; end; with (IUnknown(Columns.Add('Pos.6')) as EXCOMBOBOXLib_TLB.Column) do begin FormatColumn := '''<b>''+ 1 rpos ''</b>:<fgcolor=FF0000>|A-Z|'''; Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); Position := 5; Width := 48; AllowSizing := False; end; with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); end; EndUpdate(); end |
449 |
How can I show the child items with no identation
with ComboBox1 do begin LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesOutside; Indent := 12; HasLines := EXCOMBOBOXLib_TLB.exThinLine; Columns.Add('Default'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); InsertItem(h,Null,'Child 3'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); InsertItem(h,Null,'Child 3'); end; end |
448 |
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)
with ComboBox1 do begin LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesAtRoot; Indent := 12; Columns.Add('Default'); with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); InsertItem(h,Null,'Child 3'); ExpandItem[h] := True; end; end |
447 |
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)
with ComboBox1 do begin LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesOutside; Indent := 12; Columns.Add('Default'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); InsertItem(h,Null,'Child 3'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); InsertItem(h,Null,'Child 3'); end; end |
446 |
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)
with ComboBox1 do begin LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesInsideLeaf; Indent := 12; Columns.Add('Default'); with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); InsertItem(h,Null,'Child 3'); ExpandItem[h] := True; end; end |
445 |
Is there other ways of showing the hierarchy lines (exGroupLinesInside)
with ComboBox1 do begin LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesInside; Indent := 12; Columns.Add('Default'); with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); InsertItem(h,Null,'Child 3'); ExpandItem[h] := True; end; end |
444 |
Is there other ways of showing the hierarchy lines (exGroupLines)
with ComboBox1 do begin LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLines; Indent := 12; Columns.Add('Default'); with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(InsertItem(h,Null,'Child 2'),Null,'SubChild 2'); InsertItem(h,Null,'Child 3'); ExpandItem[h] := True; end; end |
443 |
Is it possible display numbers in the same format no matter of regional settings in the control panel
with ComboBox1 do begin BeginUpdate(); (IUnknown(Columns.Add('Def')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); with Items do begin h := AddItem(OleVariant(100000.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default positive)'''; h := AddItem(OleVariant(100000.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''2|.|3|,|1|1'')'; h := AddItem(OleVariant(-100000.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default negative)'''; h := AddItem(OleVariant(-100000.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''2|.|3|,|1|1'')'; end; EndUpdate(); end |
442 |
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8
with ComboBox1 do begin BeginUpdate(); (IUnknown(Columns.Add('Def')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); with Items do begin h := AddItem(OleVariant(0.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(OleVariant(0.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''|||||0'') + '' <fgcolor=808080>(Display no leading zeros)'''; end; EndUpdate(); end |
441 |
How can I specify the format for negative numbers
with ComboBox1 do begin BeginUpdate(); (IUnknown(Columns.Add('Def')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); with Items do begin h := AddItem(OleVariant(-100000.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(OleVariant(-100000.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''||||1'') + '' <fgcolor=808080>(Negative sign, number; for example, -1.1)'''; end; EndUpdate(); end |
440 |
Is it possible to change the grouping character when display numbers
with ComboBox1 do begin BeginUpdate(); (IUnknown(Columns.Add('Def')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); with Items do begin h := AddItem(OleVariant(100000.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(OleVariant(100000.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''|||-'') + '' <fgcolor=808080>(grouping character is -)'''; end; EndUpdate(); end |
439 |
How can I display numbers with 2 digits in each group
with ComboBox1 do begin BeginUpdate(); (IUnknown(Columns.Add('Def')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); with Items do begin h := AddItem(OleVariant(100000.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(OleVariant(100000.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''||2'') + '' <fgcolor=808080>(grouping by 2 digits)'''; end; EndUpdate(); end |
438 |
How can I display my numbers using a different decimal separator
with ComboBox1 do begin BeginUpdate(); (IUnknown(Columns.Add('Def')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); with Items do begin h := AddItem(OleVariant(100.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(OleVariant(100.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''|;'') + '' <fgcolor=808080>(decimal separator is <b>;</b>)'''; end; EndUpdate(); end |
437 |
Is it possible to display the numbers using 3 (three) digits
with ComboBox1 do begin BeginUpdate(); (IUnknown(Columns.Add('Def')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); with Items do begin h := AddItem(OleVariant(100.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(OleVariant(100.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''3'') + '' <fgcolor=808080>(3 digits)'''; h := AddItem(OleVariant(100.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format 2) + '' <fgcolor=808080>(2 digits)'''; h := AddItem(OleVariant(100.27)); FormatCell[OleVariant(h),OleVariant(0)] := '(value format 1) + '' <fgcolor=808080>(1 digit)'''; end; EndUpdate(); end |
436 |
Is it possible to format numbers
with ComboBox1 do begin BeginUpdate(); MarkSearchColumn := False; with Columns do begin Add('Name'); with (IUnknown(Add('A')) as EXCOMBOBOXLib_TLB.Column) do begin SortType := EXCOMBOBOXLib_TLB.SortNumeric; AllowSizing := False; Width := 36; FormatColumn := 'len(value) ? value + '' +'''; end; with (IUnknown(Add('B')) as EXCOMBOBOXLib_TLB.Column) do begin SortType := EXCOMBOBOXLib_TLB.SortNumeric; AllowSizing := False; Width := 36; FormatColumn := 'len(value) ? value + '' +'''; end; with (IUnknown(Add('C')) as EXCOMBOBOXLib_TLB.Column) do begin SortType := EXCOMBOBOXLib_TLB.SortNumeric; AllowSizing := False; Width := 36; FormatColumn := 'len(value) ? value + '' ='''; end; with (IUnknown(Add('A+B+C')) as EXCOMBOBOXLib_TLB.Column) do begin SortType := EXCOMBOBOXLib_TLB.SortNumeric; Width := 64; ComputedField := 'dbl(%1)+dbl(%2)+dbl(%3)'; FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' + '0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )'; Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); end; end; with Items do begin h := AddItem('Root'); CellCaptionFormat[OleVariant(h),OleVariant(4)] := EXCOMBOBOXLib_TLB.exComputedField; h1 := InsertItem(h,Null,'Child 1'); CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(7); CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(3); CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(1); h1 := InsertItem(h,Null,'Child 2'); CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(-2); CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(-2); CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(-4); h1 := InsertItem(h,Null,'Child 3'); CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(2); CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(2); CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(-4); ExpandItem[h] := True; end; EndUpdate(); end |
435 |
Is it possible to limit the height of the item while resizing
// InsertItem event - Occurs after a new item has been inserted to Items collection. procedure TForm1.ComboBox1InsertItem(ASender: TObject; Item : HITEM); begin with ComboBox1 do begin Items.ItemMinHeight[Item] := 18; Items.ItemMaxHeight[Item] := 72; end end; with ComboBox1 do begin BeginUpdate(); ItemsAllowSizing := EXCOMBOBOXLib_TLB.exResizeItem; ScrollBySingleLine := False; BackColorAlternate := RGB(240,240,240); Columns.Add('Names'); with Items do begin AddItem('Mantel'); AddItem('Mechanik'); AddItem('Motor'); AddItem('Murks'); AddItem('Märchen'); AddItem('Möhren'); AddItem('Mühle'); end; Columns.Item[OleVariant(0)].SortOrder := EXCOMBOBOXLib_TLB.SortAscending; EndUpdate(); end |
434 |
How can I simulate displaying groups
with ComboBox1 do begin HasLines := EXCOMBOBOXLib_TLB.exNoLine; ScrollBySingleLine := True; with Columns do begin Add('Name'); Add('A'); Add('B'); Add('C'); end; with Items do begin h := AddItem('Group 1'); CellHAlignment[OleVariant(h),OleVariant(0)] := EXCOMBOBOXLib_TLB.CenterAlignment; ItemDivider[h] := 0; ItemDividerLineAlignment[h] := EXCOMBOBOXLib_TLB.DividerBoth; ItemHeight[h] := 24; SortableItem[h] := False; h1 := InsertItem(h,Null,'Child 1'); CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(1); CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(2); CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(3); h1 := InsertItem(h,Null,'Child 2'); CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(4); CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(5); CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(6); ExpandItem[h] := True; h := AddItem('Group 2'); CellHAlignment[OleVariant(h),OleVariant(0)] := EXCOMBOBOXLib_TLB.CenterAlignment; ItemDivider[h] := 0; ItemDividerLineAlignment[h] := EXCOMBOBOXLib_TLB.DividerBoth; ItemHeight[h] := 24; SortableItem[h] := False; h1 := InsertItem(h,Null,'Child 1'); CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(1); CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(2); CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(3); h1 := InsertItem(h,Null,'Child 2'); CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(4); CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(5); CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(6); ExpandItem[h] := True; end; end |
433 |
How can I specify an item to be always the first item
with ComboBox1 do begin BeginUpdate(); TreeColumnIndex := -1; (IUnknown(Columns.Add('Numbers')) as EXCOMBOBOXLib_TLB.Column).SortType := EXCOMBOBOXLib_TLB.SortNumeric; with Items do begin AddItem(OleVariant(1)); AddItem(OleVariant(2)); AddItem(OleVariant(3)); AddItem(OleVariant(4)); h := AddItem('first'); ItemPosition[h] := 0; CellHAlignment[OleVariant(h),OleVariant(0)] := EXCOMBOBOXLib_TLB.RightAlignment; SortableItem[h] := False; SortChildren(0,OleVariant(0),False); end; EndUpdate(); end |
432 |
How can I specify an item to be always the last item
with ComboBox1 do begin BeginUpdate(); TreeColumnIndex := -1; (IUnknown(Columns.Add('Numbers')) as EXCOMBOBOXLib_TLB.Column).SortType := EXCOMBOBOXLib_TLB.SortNumeric; with Items do begin AddItem(OleVariant(1)); AddItem(OleVariant(2)); AddItem(OleVariant(3)); AddItem(OleVariant(4)); h := AddItem('last'); CellHAlignment[OleVariant(h),OleVariant(0)] := EXCOMBOBOXLib_TLB.RightAlignment; SortableItem[h] := False; SortChildren(0,OleVariant(0),True); end; EndUpdate(); end |
431 |
Can I allow sorting only the child items
with ComboBox1 do begin BeginUpdate(); Columns.Add('Childs'); with Items do begin h := AddItem('Root 1'); SortableItem[h] := False; InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); SortableItem[h] := False; InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; end; EndUpdate(); end |
430 |
Can I specify a terminal item so it will mark the end of childs
with ComboBox1 do begin BeginUpdate(); ScrollBySingleLine := True; Columns.Add('P1'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; h := InsertItem(h,'',''); ItemDivider[h] := 0; ItemDividerLineAlignment[h] := EXCOMBOBOXLib_TLB.DividerCenter; ItemHeight[h] := 2; SelectableItem[h] := False; SortableItem[h] := False; h := AddItem('Root 2'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; h := InsertItem(h,'',''); ItemDivider[h] := 0; ItemDividerLineAlignment[h] := EXCOMBOBOXLib_TLB.DividerCenter; ItemHeight[h] := 2; SelectableItem[h] := False; SortableItem[h] := False; end; EndUpdate(); end |
429 |
Is it possible to specify an item being unsortable so its position won't be changed after sorting
with ComboBox1 do begin BeginUpdate(); TreeColumnIndex := -1; (IUnknown(Columns.Add('Numbers')) as EXCOMBOBOXLib_TLB.Column).SortType := EXCOMBOBOXLib_TLB.SortNumeric; with Items do begin AddItem(OleVariant(1)); AddItem(OleVariant(2)); AddItem(OleVariant(3)); AddItem(OleVariant(4)); h := AddItem('top 3'); ItemPosition[h] := 3; CellHAlignment[OleVariant(h),OleVariant(0)] := EXCOMBOBOXLib_TLB.RightAlignment; SortableItem[h] := False; SortChildren(0,OleVariant(0),False); end; EndUpdate(); end |
428 |
Can I specify an item to be a separator
with ComboBox1 do begin BeginUpdate(); TreeColumnIndex := -1; SortOnClick := EXCOMBOBOXLib_TLB.exNoSort; Columns.Add('Numbers'); with Items do begin AddItem(OleVariant(1)); AddItem(OleVariant(2)); h := AddItem('separator'); SelectableItem[h] := False; ItemDivider[h] := 0; ItemDividerLineAlignment[h] := EXCOMBOBOXLib_TLB.DividerCenter; ItemDividerLine[h] := EXCOMBOBOXLib_TLB.ThinLine; CellHAlignment[OleVariant(h),OleVariant(0)] := EXCOMBOBOXLib_TLB.CenterAlignment; AddItem(OleVariant(3)); AddItem(OleVariant(4)); end; EndUpdate(); end |
427 |
How can I collapse all items
with ComboBox1 do begin BeginUpdate(); LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Columns.Add('Items'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); h := AddItem('Root 2'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[0] := False; end; EndUpdate(); end |
426 |
How can I expand all items
with ComboBox1 do begin BeginUpdate(); LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; Columns.Add('Items'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); h := AddItem('Root 2'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[0] := True; end; EndUpdate(); end |
425 |
Is it possible to specify the cell's value but still want to display some formatted text instead the value
with ComboBox1 do begin BeginUpdate(); MarkSearchColumn := False; Columns.Add('Value'); Columns.Add('FormatCell'); with Items do begin h := AddItem(OleVariant(1)); CellCaption[OleVariant(h),OleVariant(1)] := OleVariant(12); FormatCell[OleVariant(h),OleVariant(1)] := 'currency(value)'; h := AddItem('1/1/2001'); CellCaption[OleVariant(h),OleVariant(1)] := '1/1/2001'; CellCaptionFormat[OleVariant(h),OleVariant(1)] := EXCOMBOBOXLib_TLB.exHTML; FormatCell[OleVariant(h),OleVariant(1)] := 'longdate(value) replace ''2001'' with ''<b>2001</b>'''; end; EndUpdate(); end |
424 |
How can I change the foreground color for a particular column
|
423 |
How can I change the background color for a particular column
|
422 |
How can I display the column using currency format and enlarge the font for certain values
|
421 |
How can I highlight only parts of the cells
with ComboBox1 do begin with (IUnknown(Columns.Add('')) as EXCOMBOBOXLib_TLB.Column) do begin Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); FormatColumn := 'value replace ''hil'' with ''<fgcolor=FF0000><b>hil</b></fgcolor>'''; end; with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); InsertItem(h,Null,'Child 3'); ExpandItem[h] := True; end; end |
420 |
How can I get the number of occurrences of a specified string in the cell
with ComboBox1 do begin Columns.Add(''); with (IUnknown(Columns.Add('occurrences')) as EXCOMBOBOXLib_TLB.Column) do begin ComputedField := 'lower(%0) count ''o'''; FormatColumn := '''contains '' + value + '' of \''o\'' chars'''; end; with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1 oooof the root'); InsertItem(h,Null,'Child 2'); InsertItem(h,Null,'Child 3'); ExpandItem[h] := True; end; end |
419 |
How can I display dates in my format
|
418 |
How can I display dates in short format
|
417 |
How can I display dates in long format
|
416 |
How can I display only the right part of the cell
with ComboBox1 do begin Columns.Add(''); with (IUnknown(Columns.Add('Right')) as EXCOMBOBOXLib_TLB.Column) do begin ComputedField := '%0 right 2'; FormatColumn := '''"'' + value + ''"'''; end; with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); InsertItem(h,Null,'SChild 3'); ExpandItem[h] := True; end; end |
415 |
How can I display true or false instead 0 and -1
with ComboBox1 do begin (IUnknown(Columns.Add('Boolean')) as EXCOMBOBOXLib_TLB.Column).FormatColumn := 'value != 0 ? ''true'' : ''false'''; with Items do begin AddItem(OleVariant(True)); AddItem(OleVariant(False)); AddItem(OleVariant(True)); AddItem(OleVariant(0)); AddItem(OleVariant(1)); end; end |
414 |
How can I display icons or images instead numbers
with ComboBox1 do begin Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (IUnknown(Columns.Add('Icons')) as EXCOMBOBOXLib_TLB.Column) do begin Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1); FormatColumn := '''The cell displays the icon <img>''+value+''</img> instead '' + value'; end; with Items do begin AddItem(OleVariant(1)); AddItem(OleVariant(2)); AddItem(OleVariant(3)); end; end |
413 |
How can I display the column using currency
|
412 |
How can I filter programatically using more columns
with ComboBox1 do begin BeginUpdate(); MarkSearchColumn := False; with Columns do begin Add('Car'); Add('Equipment'); end; with Items do begin CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag'; CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition'; CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition'; CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP'; CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP'; CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP'; end; with Columns.Item['Car'] do begin FilterType := EXCOMBOBOXLib_TLB.exFilter; Filter := 'Mazda'; end; with Columns.Item['Equipment'] do begin FilterType := EXCOMBOBOXLib_TLB.exPattern; Filter := '*ABS*|*ESP*'; end; ApplyFilter(); EndUpdate(); end |
411 |
I need a combobox that supports selecting multiple items, preferably with checkboxes. I can't find an example of how to do this. Does your control support it
// CellStateChanged event - Fired after cell's state has been changed. procedure TForm1.ComboBox1CellStateChanged(ASender: TObject; Cell : HCELL); begin with ComboBox1 do begin LabelText := Cell; OutputDebugString( Items.CellCaption[OleVariant(0),OleVariant(Cell)] ); OutputDebugString( Items.CellState[OleVariant(0),OleVariant(Cell)] ); end end; with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDownList; IntegralHeight := True; HeaderVisible := False; SingleEdit := True; SearchColumnIndex := -1; AdjustSearchColumn := False; (IUnknown(Columns.Add('Language')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True); with Items do begin AddItem('English'); AddItem('Hebrew'); AddItem('Spanish'); end; EndUpdate(); end |
410 |
How can I display a different caption in the label area, when I click the cell's check box
// CellStateChanged event - Fired after cell's state has been changed. procedure TForm1.ComboBox1CellStateChanged(ASender: TObject; Cell : HCELL); begin with ComboBox1 do begin LabelText := Cell; OutputDebugString( Items.CellCaption[OleVariant(0),OleVariant(Cell)] ); OutputDebugString( Items.CellState[OleVariant(0),OleVariant(Cell)] ); end end; with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDownList; IntegralHeight := True; HeaderVisible := False; SingleEdit := True; SearchColumnIndex := -1; AdjustSearchColumn := False; (IUnknown(Columns.Add('Language')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True); with Items do begin AddItem('English'); AddItem('Hebrew'); AddItem('Spanish'); end; LabelText := ' <b>custom</b> text '; EndUpdate(); end |
409 |
How can I display a different caption in the label area
with ComboBox1 do begin BeginUpdate(); Style := EXCOMBOBOXLib_TLB.DropDownList; IntegralHeight := True; HeaderVisible := False; SingleEdit := True; SearchColumnIndex := -1; AdjustSearchColumn := False; (IUnknown(Columns.Add('Language')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True); with Items do begin AddItem('English'); AddItem('Hebrew'); AddItem('Spanish'); end; LabelText := ' <b>custom</b> text '; EndUpdate(); end |
408 |
How can I change the background appearance (ebn) for the filter field in the bottom part of the drop down portion
with ComboBox1 do begin BeginUpdate(); VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn'); FilterForVisible := True; FilterForBackColor := $1000000; IntegralHeight := True; Columns.Add('Default'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); AddItem('Item 5'); end; EndUpdate(); end |
407 |
How can I change the background color for the filter field in the bottom part of the drop down portion
with ComboBox1 do begin BeginUpdate(); FilterForVisible := True; FilterForBackColor := RGB(240,240,240); IntegralHeight := True; Columns.Add('Default'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); AddItem('Item 5'); end; EndUpdate(); end |
406 |
How can I display a filter field in the bottom part of the drop down portion
with ComboBox1 do begin BeginUpdate(); FilterForVisible := True; IntegralHeight := True; Columns.Add('Default'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); AddItem('Item 5'); end; EndUpdate(); end |
405 |
Does your control support RightToLeft property for RTL languages or right to left
with ComboBox1 do begin BeginUpdate(); LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot; with (IUnknown(Columns.Add('P1')) as EXCOMBOBOXLib_TLB.Column) do begin Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True); PartialCheck := True; end; with Items do begin h := AddItem('Root'); InsertItem(h,Null,'Child 1'); InsertItem(h,Null,'Child 2'); ExpandItem[h] := True; end; RightToLeft := True; EndUpdate(); end |
404 |
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
with ComboBox1 do begin BeginUpdate(); with Columns do begin Add('C1'); Add('C2'); Add('C3'); Add('C4'); Add('C5'); Add('C6'); Add('C7'); Add('C8'); end; RightToLeft := True; EndUpdate(); end |
403 |
Can I display the cell's check box after the text
with ComboBox1 do begin with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do begin Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True); Def[EXCOMBOBOXLib_TLB.exCellDrawPartsOrder] := 'caption,check'; end; with Items do begin CellHasCheckBox[OleVariant(AddItem('Caption 1')),OleVariant(0)] := True; CellHasCheckBox[OleVariant(AddItem('Caption 2')),OleVariant(0)] := True; end; end |
402 |
Can I change the order of the parts in the cell, as checkbox after the text, and so on
with ComboBox1 do begin Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellDrawPartsOrder] := 'caption,check,icon,icons,picture'; with Items do begin h := AddItem('Text'); CellImage[OleVariant(h),OleVariant(0)] := 1; CellHasCheckBox[OleVariant(h),OleVariant(0)] := True; end; end |
401 |
Can I have an image displayed after the text. Can I get that effect without using HTML content
|